﻿using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Label4.Text = DateTime.Today.ToString("f");
        if (Page.User.Identity.Name != "")
        {
            if (!Roles.IsUserInRole("MovieTix") & !Roles.IsUserInRole("Theatre") & !Roles.IsUserInRole("TheatreAdmin"))
            {
                HyperLink15.Text = "My Account";

                HyperLink15.NavigateUrl = "~/myaccount.aspx";
            }

            else if (Roles.IsUserInRole("MovieTix"))
            {
                HyperLink15.Text = "MovieTix Staff";

                HyperLink15.NavigateUrl = "~/MovieTixstaff/addtheatre.aspx";
            }
            else if (Roles.IsUserInRole("Theatre"))
            {
                HyperLink15.Text = "Theatre Staff";

                HyperLink15.NavigateUrl = "~/Theatrestaff/cinema.aspx";
            }
            else if (Roles.IsUserInRole("TheatreAdmin"))
            {
                HyperLink15.Text = "Theatre admin";

                HyperLink15.NavigateUrl = "~/Theatrestaff/addnewuser.aspx";
            }
        }
    }
}
